import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/Home.vue';
import login from '@/views/login/login';
import Notfound from '@/views/404';
// 
import StudentList from '@/views/students/StudentList';
import InfoList from '@/views/students/InfoList';
import InfoLists from '@/views/students/InfoLists';
import WordMent from '@/views/students/WordMent';
import WorkList from '@/views/students/WorkList';
// 
import DataView from '@/views/dataAnalysis/DataView'
import MapView from '@/views/dataAnalysis/MapView'
import ScoreMap from '@/views/dataAnalysis/ScoreMap'
import TraveMap from '@/views/dataAnalysis/TraveMap'

import user from '@/views/users/user';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: '数据分析',
    iconclass:'el-icon-s-data',
    component: Home,
    children: [
      {
        path: '/home/DataView',
        name: '数据概括',
        iconclass:'el-icon-s-data',
        component: DataView,
      },
      {
        path: '/home/MapView',
        name: '地图概括',
        iconclass:'el-icon-s-data',
        component: MapView,
      },
      {
        path: '/home/TraveMap',
        name: '旅游地图',
        component: TraveMap,
      },
      {
        path: '/home/ScoreMap',
        name: '分散地图',
        component: ScoreMap,
      },
   
    ],
  },
  {
    path: '/',
    name: '学生管理',
    component: Home,
    iconclass:'el-icon-s-home',
    children: [
      {
        path: '/home/student',
        name: '学生列表',
        component: StudentList,
      },
      {
        path: '/home/InfoList',
        name: '信息列表',
        component: InfoList,
      },
      {
        path: '/home/InfoLists',
        name: '信息管理',
        component: InfoLists,
      },
      {
        path: '/home/WorkList',
        name: '作业列表',
        component: WorkList,
      },
      {
        path: '/home/WordMent',
        name: '作业管理',
        component: WordMent,
      },
     
   
    ],
  },
     
 
  {
    path: '/',
    name: '用户中心',
    component: Home,
    iconclass:'el-icon-s-home',
    children: [ 
      {
        path: '/home/user',
        name: '用户中心',
        component: user,
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    hideden:true,
    component: login,
  },
  {
    path: '*',
    name: '404',
    hideden:true,
    component: Notfound,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
